# 使用Java基础镜像
FROM openjdk:8-jdk-alpine

# 设定时区
ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

# 将构建后的应用jar复制到镜像中
COPY /home/zyb/javaProjects/jyl/backend/jyl-app.jar jyl-app.jar

# 运行应用
ENTRYPOINT ["java","-jar","jyl-app.jar","--spring.profiles.active=prod"]
